WebTextEditor provides a property to remove toolbar during InitializeToolBar server side event.
In this topic, you will learn how to remove toolbar.
To remove toolbar during InitializeToolBar server side event
- Implement InitializeToolBar server side event in the WebTextEditor. Here is the snippet to remove toolbar using their name or position from the WebTextEditor:
C#
Copy Codeprotected void WebTextEditor1_InitializeToolBar(object sender, ISNet.WebUI.WebTextEditor.WebTextEditorToolBarArgs e) { WebTextEditorToolBar tbFormatting = WebTextEditor1.ToolBar.GetNamedItem("WebTextEditor1_tbFormatting"); WebTextEditor1.ToolBar.Remove(tbFormatting); }
OR
C#
Copy Codeprotected void WebTextEditor1_InitializeToolBar(object sender, ISNet.WebUI.WebTextEditor.WebTextEditorToolBarArgs e) { WebTextEditor1.ToolBar.RemoveAt(0); }